#include "bencode.h"

bInteger::bInteger(const char *bInteger) : bItem(B_INTEGER)
{
	m_integer = 0;
	const char *ptr = &(bInteger[1]);
	while (ptr[0] != 'e')
	{
		m_integer = 10*m_integer + (int)(ptr++[0]-'0');
	}
	m_charoffset = ptr+1 - bInteger;
}

bInteger::~bInteger()
{

}

int bInteger::GetInteger()
{
	return m_integer;
}
